Optimal. Leaf size=41 \[ a \sin (c) \text{CosIntegral}(d x)+a \cos (c) \text{Si}(d x)+\frac{b \sin (c+d x)}{d^2}-\frac{b x \cos (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0908074, antiderivative size = 41, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.353, Rules used = {3339, 3303, 3299, 3302, 3296, 2637} \[ a \sin (c) \text{CosIntegral}(d x)+a \cos (c) \text{Si}(d x)+\frac{b \sin (c+d x)}{d^2}-\frac{b x \cos (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3339
Rule 3303
Rule 3299
Rule 3302
Rule 3296
Rule 2637
Rubi steps
\begin{align*} \int \frac{\left (a+b x^2\right ) \sin (c+d x)}{x} \, dx &=\int \left (\frac{a \sin (c+d x)}{x}+b x \sin (c+d x)\right ) \, dx\\ &=a \int \frac{\sin (c+d x)}{x} \, dx+b \int x \sin (c+d x) \, dx\\ &=-\frac{b x \cos (c+d x)}{d}+\frac{b \int \cos (c+d x) \, dx}{d}+(a \cos (c)) \int \frac{\sin (d x)}{x} \, dx+(a \sin (c)) \int \frac{\cos (d x)}{x} \, dx\\ &=-\frac{b x \cos (c+d x)}{d}+a \text{Ci}(d x) \sin (c)+\frac{b \sin (c+d x)}{d^2}+a \cos (c) \text{Si}(d x)\\ \end{align*}
Mathematica [A] time = 0.131413, size = 54, normalized size = 1.32 \[ a \sin (c) \text{CosIntegral}(d x)+a \cos (c) \text{Si}(d x)-\frac{b \cos (d x) (d x \cos (c)-\sin (c))}{d^2}+\frac{b \sin (d x) (d x \sin (c)+\cos (c))}{d^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.009, size = 60, normalized size = 1.5 \begin{align*}{\frac{ \left ( 1+c \right ) b \left ( \sin \left ( dx+c \right ) - \left ( dx+c \right ) \cos \left ( dx+c \right ) \right ) }{{d}^{2}}}+2\,{\frac{cb\cos \left ( dx+c \right ) }{{d}^{2}}}+a \left ({\it Si} \left ( dx \right ) \cos \left ( c \right ) +{\it Ci} \left ( dx \right ) \sin \left ( c \right ) \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] time = 1.92764, size = 89, normalized size = 2.17 \begin{align*} -\frac{2 \, b d x \cos \left (d x + c\right ) -{\left (a{\left (-i \,{\rm Ei}\left (i \, d x\right ) + i \,{\rm Ei}\left (-i \, d x\right )\right )} \cos \left (c\right ) + a{\left ({\rm Ei}\left (i \, d x\right ) +{\rm Ei}\left (-i \, d x\right )\right )} \sin \left (c\right )\right )} d^{2} - 2 \, b \sin \left (d x + c\right )}{2 \, d^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.69192, size = 200, normalized size = 4.88 \begin{align*} \frac{2 \, a d^{2} \cos \left (c\right ) \operatorname{Si}\left (d x\right ) - 2 \, b d x \cos \left (d x + c\right ) + 2 \, b \sin \left (d x + c\right ) +{\left (a d^{2} \operatorname{Ci}\left (d x\right ) + a d^{2} \operatorname{Ci}\left (-d x\right )\right )} \sin \left (c\right )}{2 \, d^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 4.40804, size = 63, normalized size = 1.54 \begin{align*} a \sin{\left (c \right )} \operatorname{Ci}{\left (d x \right )} + a \cos{\left (c \right )} \operatorname{Si}{\left (d x \right )} + b x \left (\begin{cases} - \cos{\left (c \right )} & \text{for}\: d = 0 \\- \frac{\cos{\left (c + d x \right )}}{d} & \text{otherwise} \end{cases}\right ) - b \left (\begin{cases} - x \cos{\left (c \right )} & \text{for}\: d = 0 \\- \frac{\begin{cases} \frac{\sin{\left (c + d x \right )}}{d} & \text{for}\: d \neq 0 \\x \cos{\left (c \right )} & \text{otherwise} \end{cases}}{d} & \text{otherwise} \end{cases}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]